package com.ruoyi.travel.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.travel.mapper.GuideDetailMapper;
import com.ruoyi.travel.domain.GuideDetail;
import com.ruoyi.travel.service.IGuideDetailService;

/**
 * 旅游攻略Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-07
 */
@Service
public class GuideDetailServiceImpl implements IGuideDetailService 
{
    @Autowired
    private GuideDetailMapper guideDetailMapper;

    /**
     * 查询旅游攻略
     * 
     * @param id 旅游攻略主键
     * @return 旅游攻略
     */
    @Override
    public GuideDetail selectGuideDetailById(Long id)
    {
        return guideDetailMapper.selectGuideDetailById(id);
    }

    /**
     * 查询旅游攻略列表
     * 
     * @param guideDetail 旅游攻略
     * @return 旅游攻略
     */
    @Override
    public List<GuideDetail> selectGuideDetailList(GuideDetail guideDetail)
    {
        return guideDetailMapper.selectGuideDetailList(guideDetail);
    }

    /**
     * 新增旅游攻略
     * 
     * @param guideDetail 旅游攻略
     * @return 结果
     */
    @Override
    public int insertGuideDetail(GuideDetail guideDetail)
    {
        return guideDetailMapper.insertGuideDetail(guideDetail);
    }

    /**
     * 修改旅游攻略
     * 
     * @param guideDetail 旅游攻略
     * @return 结果
     */
    @Override
    public int updateGuideDetail(GuideDetail guideDetail)
    {
        return guideDetailMapper.updateGuideDetail(guideDetail);
    }

    /**
     * 批量删除旅游攻略
     * 
     * @param ids 需要删除的旅游攻略主键
     * @return 结果
     */
    @Override
    public int deleteGuideDetailByIds(Long[] ids)
    {
        return guideDetailMapper.deleteGuideDetailByIds(ids);
    }

    /**
     * 删除旅游攻略信息
     * 
     * @param id 旅游攻略主键
     * @return 结果
     */
    @Override
    public int deleteGuideDetailById(Long id)
    {
        return guideDetailMapper.deleteGuideDetailById(id);
    }

    @Override
    public void addPath(Long guideId,String filePath) {
        guideDetailMapper.addPath(guideId,filePath);
    }
}
